package cn.xue.content.api;

import cn.xue.base.model.PageParams;
import cn.xue.base.model.PageResult;
import cn.xue.content.service.CourseBaseService;
import cn.xue.content.service.CourseCategoryService;
import cn.xue.domain.dto.CourseCategoryTreeDto;
import cn.xue.domain.dto.QueryCourseParamsDto;
import cn.xue.domain.entity.CourseBase;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 35238
 * 功能: 课程信息编辑接口
 * 时间: 2024-03-28 21:10
 */
@Api(value = "课程信息编辑",tags = "课程信息编辑")
@RestController
public class CourseBaseInfoController {

    @Autowired
    private CourseBaseService courseBaseService;


    @ApiOperation("环境测试接口")
    @GetMapping("/course/index")
    public String index(){
        //测试接口，可以自己删掉这个接口
        return "看到我，你的环境就是没问题的啦";
    }


    @ApiOperation("课程查询接口")
    @PostMapping("/course/list")
    public PageResult<CourseBase> list(PageParams pageParams, @RequestBody QueryCourseParamsDto dto){
        PageResult<CourseBase> pageResult = courseBaseService.queryCourseBaseList(pageParams, dto);
        return pageResult;
    }


}